/**
 * Created by CZ on 2017/4/6.
 */
module.exports = function($scope, $rootScope, RequestService,commonConfig){
    $rootScope.isShowFooter = false;
    // 设置轮播图图片间隔
    $scope.myInterval = 5000;
    // 轮播图数据初始化
    var slides = $scope.slides = [];
    // 添加轮播图源
    slides.push({image : 'src/imgs/banner1.png', text : ''});
    // slides.push({ image: 'src/imgs/banner2.png', text: '' });
    //解决退出后返回至首页时重新获取token的延时不识别问题
    $scope.$watch('commonMsgIsSave', function(newVal, oldVal){
        if(newVal === true){
            //获取租户数量
            RequestService.Request(commonConfig.cloudApi+'cloud/tenant/getTenantCount', 'GET').then(function(response){
                console.log(response);
                $scope.TenantNum = response;
            }, function(error){
                console.log(error);
            });
        }
    });

};